home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Programming / EasyPLUGINs / source / location.e < prev    next >
Encoding:
Text File  |  1998-02-13  |  865 b   |  50 lines

  1. OPT MODULE, OSVERSION=37
  2.  
  3. MODULE 'tools/EasyGUI',
  4.        'intuition/intuition'
  5.  
  6. EXPORT OBJECT location_plugin OF plugin
  7.  
  8.     lx, ly, lw, lh
  9.  
  10. ENDOBJECT
  11.  
  12. PROC min_size(ta,fh) OF location_plugin IS 0,0
  13.  
  14. PROC will_resize() OF location_plugin IS FALSE
  15.  
  16. PROC render(ta,x,y,xs,ys,win:PTR TO window) OF location_plugin
  17.  
  18.     self.get_values(win)
  19.  
  20. ENDPROC
  21.  
  22. PROC message_test(imsg:PTR TO intuimessage,win:PTR TO window) OF location_plugin
  23.  
  24.     IF (imsg.class=IDCMP_CHANGEWINDOW) OR (imsg.class=IDCMP_NEWSIZE)
  25.  
  26.         self.get_values(win)
  27.  
  28.         RETURN TRUE
  29.  
  30.     ENDIF
  31.  
  32. ENDPROC FALSE
  33.  
  34. PROC message_action(class, qual, code, win:PTR TO window) OF location_plugin IS TRUE
  35.  
  36. PROC get_values(win:PTR TO window) OF location_plugin
  37.  
  38.     IF win
  39.  
  40.         self.lx:=win.leftedge
  41.         self.ly:=win.topedge
  42.  
  43.         self.lw:=win.width
  44.         self.lh:=win.height
  45.  
  46.     ENDIF
  47.  
  48. ENDPROC
  49.  
  50.